package com.yjkf.zh.admin.service;

import com.yjkf.zh.admin.model.SysDevice;
import com.yjkf.zh.admin.model.SysUser;
import com.yjkf.zh.admin.model.SysUserDevice;
import com.yjkf.zh.admin.model.SysUserRole;
import com.yjkf.zh.core.page.PageRequest;
import com.yjkf.zh.core.page.PageResult;
import com.yjkf.zh.core.service.CurdService;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Set;

public interface SysUserService extends CurdService<SysUser> {
    List<SysUser> findAll();

    SysUser findByName(String username);

    SysUser findByNameWithId(String username,Long id);

    Set<String> findPermissions(String userName);

    PageResult findPageBy(PageRequest pageRequest);

    //设备逻辑授权
    int upDevForUser(List<SysUserDevice> records, Long id, Long selfId);

    //查找用户角色集合
    List<SysUserRole> findUserRoles(Long userId);

    int updatePassword(SysUser sysUser);

}
